package com.yst.sqlbuilder;

public class SQLExp<L,R> implements IExpression {

    private final ISQLExpression leftExpression;
    private final ISQLExpression rightExpression;
    private final Symbol symbol;
    public SQLExp(ISQLExpression leftExpression, ISQLExpression rightExpression, Symbol symbol){
        this.leftExpression=leftExpression;
        this.rightExpression=rightExpression;
        this.symbol=symbol;
    }

    @Override
    public String generateExpression(GenerateParam param) {
        return leftExpression.generateExpression(param).concat(symbol.symbol).concat(rightExpression.generateExpression(
                param
        ));
    }


}
